<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>系统配置-服务端配置</title>
    <jsp:include page="../../include/base.jsp"></jsp:include>
	<jsp:include page="../../include/common.jsp"></jsp:include>
	<jsp:include page="../../include/baseManage.jsp"></jsp:include>
	
	<style type="text/css">
	    fieldset{width:600px; margin:10px auto; border: 1px solid #D2D2D2;}        
	    .hideFieldset{border:0;}
	    .hideFieldset .fieldset-body{display:none;}
	    hr{width:100%; border:0; border-bottom:1px dashed #D2D2D2;}
	    .wftable{width:600px; font-size: 12px;}
    </style>
  </head>
  <body>
  	<form id="webCfgForm" method="post"> 
	  	<div class="mini-panel" style="width:100%;height:100%;" borderStyle="border:0;" showHeader="false" showToolbar="true" bodyStyle="padding:0;">
		    <div property="toolbar" style="border:0;">
		    	<div class="mini-toolbar" style="border:0;padding-left:6px;">
		    		<div class="operatePanel">
			       		<input id="web_config_edit" class="mini-button" text="保存编辑" 
			       			iconCls="icon-save" plain="false" onclick="WebCfgHandler.save"/>
			       		<input id="web_config_syn" class="mini-button" text="同步设置" iconCls="icon-btn-tongbu" plain="false" 
							onclick="WebCfgHandler.webCfgSyn"/>
				    </div>
		    	</div>
		    </div>
		    <div title="前端基础配置" class="mini-panel" style="width:100%;" borderStyle="border:0;" headerStyle="border-bottom:1px solid #C9C9C9;">
		    	<fieldset id="fs1">
			        <legend><label style="color:red;cursor:pointer;"><input type="checkbox" checked="checked" id="cb1" onclick="toggleFieldSet(this, 'fs1')"/>网站基础配置</label></legend>
			        <div class="fieldset-body">
			           <table class="wftable" cellpadding="6">
					    	<tr>
					    		<td align="right" width="110px">网站名称</td>
					    		<td>
					    			<input name="swcId" class="mini-textbox" style="display: none;"/>
					    			<input name="swcWebname" class="mini-textbox" required="true" width="460"/>
					    		</td>
					    	</tr>
					    	<tr>
					    		<td align="right">系统公告</td>
					    		<td>
					    			<input name="swcSysnotice" class="mini-textarea" required="true" width="460" height="100"/>
					    		</td>
					    	</tr>
					    	<tr>
					    		<td align="right">是否启用购物券功能</td>
					    		<td>
					    			<div id="swcEbcoupon" name="swcEbcoupon" class="mini-radiobuttonlist" 
						    		 	repeatItems="2" repeatLayout="table" repeatDirection="horizontal"  
						    		 	textField="text" valueField="value">
					    		</td>
					    	</tr>
					    </table>
			        </div>
			    </fieldset>
		    </div>
		    <div title="邮件服务器配置" class="mini-panel" style="width:100%;" borderStyle="border:0;" headerStyle="border-top:1px solid #C9C9C9;border-bottom:1px solid #C9C9C9;">
		    	<fieldset id="fs2">
			        <legend><label style="color:red;cursor:pointer;"><input type="checkbox" checked="checked" id="cb2" onclick="toggleFieldSet(this, 'fs2')"/>邮件服务账户</label></legend>
			        <div class="fieldset-body">
			           <table class="wftable" cellpadding="6">
				    		<tr>
					    		<td align="right" width="110px">邮件服务器名称</td>
					    		<td>
					    			<input name="swcMhostname" class="mini-textbox" required="true" width="173"/>
					    		</td>
					    		<td align="right">邮件发送人名称</td>
					    		<td>
					    			<input name="swcMdispname" class="mini-textbox" required="true" width="173"/>
					    		</td>
					    	</tr>
					    	<tr>
					    		<td align="right">邮件服务器账号</td>
					    		<td>
					    			<input name="swcMusername" class="mini-textbox" required="true" width="173"/>
					    		</td>
					    		<td align="right">邮件服务器密码</td>
					    		<td>
					    			<input name="swcMpassword" class="mini-password" required="true" width="173"/>
					    		</td>
					    	</tr>
					    </table>
			        </div>
			    </fieldset>
			     <hr/>
			     <fieldset id="fs3">
			        <legend><label style="color:red;cursor:pointer;"><input type="checkbox" checked="checked" id="cb3" onclick="toggleFieldSet(this, 'fs3')"/>会员激活邮件</label></legend>
			        <div class="fieldset-body">
			           <table class="wftable" cellpadding="6">
					    	<tr>
					    		<td align="right" width="110px">会员激活邮件主题</td>
					    		<td>
					    			<input name="swcActsubject" class="mini-textbox" required="true" width="460"/>
					    		</td>
					    	</tr>
					    	<tr>
					    		<td align="right">会员激活邮件内容</td>
					    		<td>
					    			<input name="swcActcontent" class="mini-textarea" required="true" width="460" height="160"/>
					    		</td>
					    	</tr>
					    </table>
			        </div>
			    </fieldset>
			    <hr/>
			    <fieldset id="fs4">
			        <legend><label style="color:red;cursor:pointer;"><input type="checkbox" checked="checked" id="cb4" onclick="toggleFieldSet(this, 'fs4')"/>密码重置邮件</label></legend>
			        <div class="fieldset-body">
			           <table class="wftable" cellpadding="6">
					    	<tr>
					    		<td align="right" width="110px">密码重置邮件主题</td>
					    		<td>
					    			<input name="swcPwdsubject" class="mini-textbox" required="true" width="460"/>
					    		</td>
					    	</tr>
					    	<tr>
					    		<td align="right">密码重置邮件内容</td>
					    		<td>
					    			<input name="swcPwdcontent" class="mini-textarea" required="true" width="460" height="160"/>
					    		</td>
					    	</tr>
					    </table>
			        </div>
			    </fieldset>
			    <hr/>
			    <fieldset id="fs5">
			        <legend><label style="color:red;cursor:pointer;"><input type="checkbox" checked="checked" id="cb5" onclick="toggleFieldSet(this, 'fs5')"/>手机绑定邮件</label></legend>
			        <div class="fieldset-body">
			           <table class="wftable" cellpadding="6">
					    	<tr>
					    		<td align="right" width="110px">手机绑定邮件主题</td>
					    		<td>
					    			<input name="swcTelsubject" class="mini-textbox" required="true" width="460"/>
					    		</td>
					    	</tr>
					    	<tr>
					    		<td align="right">手机绑定邮件内容</td>
					    		<td>
					    			<input name="swcTelcontent" class="mini-textarea" required="true" width="460" height="160"/>
					    		</td>
					    	</tr>
					    </table>
			        </div>
			    </fieldset>
			    <hr/>
			    <fieldset id="fs6">
			        <legend><label style="color:red;cursor:pointer;"><input type="checkbox" checked="checked" id="cb6" onclick="toggleFieldSet(this, 'fs6')"/>邮箱绑定邮件</label></legend>
			        <div class="fieldset-body">
			           <table class="wftable" cellpadding="6">
					    	<tr>
					    		<td align="right" width="110px">邮箱绑定邮件主题</td>
					    		<td>
					    			<input name="swcMilsubject" class="mini-textbox" required="true" width="460"/>
					    		</td>
					    	</tr>
					    	<tr>
					    		<td align="right">邮箱绑定邮件内容</td>
					    		<td>
					    			<input name="swcMilcontent" class="mini-textarea" required="true" width="460" height="160"/>
					    		</td>
					    	</tr>
					    </table>
			        </div>
			    </fieldset>
			    <hr/>
			    <table class="wftable" align="center" cellpadding="6">
			    	<tr>
			    		<td align="left">
			    			<p style="color:red;"><span class="icon-help">&nbsp;&nbsp;&nbsp;&nbsp;</span>&nbsp;邮件配置说明：</p>
			    			<p>&nbsp;1、所有邮件内容均为必填选项</p>
			    			<p>&nbsp;2、支持常用的SMTP服务器，如sina、163、qq、等</p>
			    			<p>&nbsp;3、邮件内容必须包含的系统变量：@targetResetUrl（处理邮件的目标地址）</p>
			    			<p>&nbsp;4、邮件内容其它可选系统变量：@targetMail（目标邮件/收件人）、@newLine（换行符）</p>
			    			<p>&nbsp;5、未启用：系统尚未涉及到的邮件！</p>
			    			<br/>
			    		</td>
			    	</tr>
			    </table>
		    </div>
		</div>
	</form>
  </body>
  <script src="../webMgr/config/WebMgrConfig.js" type="text/javascript"></script>
  <script src="handler/WebCfgHandler.js" type="text/javascript"></script>
</html>

